package com.cnap.multiclouldmgmt.model.microSvc.alg;

import com.cnap.multiclouldmgmt.model.microSvc.assist.AlarmSvcDataModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

/**
 * 内存使用的情况
 *
 * @author xc
 **/
@ApiModel(value = "com.cnap.multiclouldmgmt.model.microSvc.alg.IndicatorHistoryModel",description = "算法算出来的值")
public class IndicatorHistoryModel {

    //微服务id
    @ApiModelProperty(value = "微服务id")
    private String microSvcId;

    //时间戳
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    //时间戳
    @ApiModelProperty(value = "时间戳")
    private long createTimestamp;

    @ApiModelProperty(value = "cpuUsage")
    private String cpuUsage;

    @ApiModelProperty(value = "memUsage")
    private String memUsage;

    @ApiModelProperty(value = "diskIops")
    private String diskIops;

    @ApiModelProperty(value = "diskThroughput")
    private String diskThroughput;

    @ApiModelProperty(value = "netBandwidth")
    private String netBandwidth;

    @ApiModelProperty(value = "indicatorKey")
    private String indicatorKey;

    /**
     * get
     *
     * @return MicroSvcId
     */
    public String getMicroSvcId() {
        return microSvcId;
    }

    /**
     * set
     *
     * @param microSvcId microSvcId
     */
    public void setMicroSvcId(String microSvcId) {
        this.microSvcId = microSvcId;
    }

    /**
     * get
     *
     * @return CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * set
     *
     * @param createTime createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * get
     *
     * @return CreateTimestamp
     */
    public long getCreateTimestamp() {

        if (createTime != null){
            return createTime.getTime();
        }

        return createTimestamp;
    }

    /**
     * set
     *
     * @param createTimestamp createTimestamp
     */
    public void setCreateTimestamp(long createTimestamp) {
        this.createTimestamp = createTimestamp;
    }

    /**
     * get
     *
     * @return CpuUsage
     */
    public String getCpuUsage() {
        return cpuUsage;
    }

    /**
     * set
     *
     * @param cpuUsage cpuUsage
     */
    public void setCpuUsage(String cpuUsage) {
        this.cpuUsage = cpuUsage;
    }

    /**
     * get
     *
     * @return MemUsage
     */
    public String getMemUsage() {
        return memUsage;
    }

    /**
     * set
     *
     * @param memUsage memUsage
     */
    public void setMemUsage(String memUsage) {
        this.memUsage = memUsage;
    }

    /**
     * get
     *
     * @return DiskIops
     */
    public String getDiskIops() {
        return diskIops;
    }

    /**
     * set
     *
     * @param diskIops diskIops
     */
    public void setDiskIops(String diskIops) {
        this.diskIops = diskIops;
    }

    /**
     * get
     *
     * @return DiskThroughput
     */
    public String getDiskThroughput() {
        return diskThroughput;
    }

    /**
     * set
     *
     * @param diskThroughput diskThroughput
     */
    public void setDiskThroughput(String diskThroughput) {
        this.diskThroughput = diskThroughput;
    }

    /**
     * get
     *
     * @return NetBandwidth
     */
    public String getNetBandwidth() {
        return netBandwidth;
    }

    /**
     * set
     *
     * @param netBandwidth netBandwidth
     */
    public void setNetBandwidth(String netBandwidth) {
        this.netBandwidth = netBandwidth;
    }

    /**
     * get
     *
     * @return IndicatorKey
     */
    public String getIndicatorKey() {
        return indicatorKey;
    }

    /**
     * set
     *
     * @param indicatorKey indicatorKey
     */
    public void setIndicatorKey(String indicatorKey) {
        this.indicatorKey = indicatorKey;
    }
}
